package cn.hlyc.controller;

import cn.hlyc.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Value("${server.port}")
    private Integer port;

    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable(value = "id") long userid){
        return User.builder().id(userid).name("郑秀晶").intro("跳舞" + port).build();
    }
}





















